package com.atguigu.common.validator;


import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author lvling
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = ValuedEnumValidator.class)
public @interface ValuedEnum {

    String message() default "{validation.constraints.ValuedEnum.message}";

    Class<? extends Enum> type();

    String field();

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
